package com.demo.controller;

import com.demo.common.AjaxResult;
import com.demo.entity.Role;
import com.demo.service.RoleService;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2025-10-11 9:19
 * Description：<描述>
 */
@RestController
@RequestMapping("/role")
@RequiredArgsConstructor
public class RoleController {

    private final RoleService roleService;

    @GetMapping
    public AjaxResult findAll(){
        return AjaxResult.success(roleService.list());
    }

}
